﻿
namespace NetROS.Tiers.Windows.Forms
{
	/// <summary>
	/// abstract Banka typed datagridview
	/// </summary>
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public abstract class BankaDataGridViewBase : System.Windows.Forms.UserControl
	{	
		/// <summary> 
		/// Thrown when the current Entity changed.
		/// </summary>
		public event System.EventHandler<BankaDataGridViewEventArgs> CurrentEntityChanged;
		
		#region Fields
				
		/// <summary> 
		/// the current entity.
		/// </summary>
		private Entities.Banka _currentBanka = null;
		//private Dictionary<string, string> _columnsHeaders = new Dictionary<string, string>();
		
		/// <summary> 
		/// the datagridview instance
		/// </summary>
		protected System.Windows.Forms.DataGridView uxBankaDataGridView;
		
		/// <summary> 
		/// the errorprovider
		/// </summary>
		protected System.Windows.Forms.ErrorProvider uxBankaErrorProvider;
		
		/// <summary> 
		/// the bindingsource
		/// </summary>
		protected System.Windows.Forms.BindingSource uxBankaBindingSource;
		
		
		/// <summary> 
		/// the DGV column associated with the ID property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxIDDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the Naziv property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxNazivDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the VodeciBrojDepozitneIstitucije property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxVodeciBrojDepozitneIstitucijeDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDMjesto property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDMjestoDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the MB property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxMBDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the MinimalniIznos property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxMinimalniIznosDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the MaksimalniIznos property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxMaksimalniIznosDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the MaksimalniBrojRata property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxMaksimalniBrojRataDataGridViewColumn;
		
		#endregion
					
		#region Combo list
		
				
		private Entities.TList<Entities.Mjesto> _IDMjestoList;
		
		/// <summary> 
		/// The list of selectable Mjesto
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.Mjesto> IDMjestoList
		{
			get {return this._IDMjestoList;}
			set 
			{
				this._IDMjestoList = value;
				this.uxIDMjestoDataGridViewColumn.DataSource = null;
				this.uxIDMjestoDataGridViewColumn.DataSource = this._IDMjestoList;
			}
		}
		
		private bool _allowNewItemInIDMjestoList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of Mjesto
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDMjestoList
		{
			get { return _allowNewItemInIDMjestoList;}
			set
			{
				this._allowNewItemInIDMjestoList = value;
				this.uxIDMjestoDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
		#endregion
		
		#region Main Datasource
		
		private Entities.TList<Entities.Banka> _BankaList;
				
		/// <summary> 
		/// The list of Banka to be displayed in the DGV.
		/// </summary>
		[System.ComponentModel.Category("Data")]
		public Entities.TList<Entities.Banka> BankaList
		{
			get {return this._BankaList;}
			set
			{
				this._BankaList = value;
				this.uxBankaBindingSource.DataSource = null;
				this.uxBankaBindingSource.DataSource = value;
				this.uxBankaDataGridView.DataSource = null;
				this.uxBankaDataGridView.DataSource = this.uxBankaBindingSource;				
				//this.uxBankaBindingSource.ListChanged += new System.ComponentModel.ListChangedEventHandler(uxBankaBindingSource_ListChanged);
				this.uxBankaBindingSource.CurrentItemChanged += new System.EventHandler(OnBankaBindingSourceCurrentItemChanged);
			}
		}
		
		private void OnBankaBindingSourceCurrentItemChanged(object sender, System.EventArgs e)
		{
			_currentBanka = uxBankaBindingSource.Current as Entities.Banka;
			
			if (_currentBanka != null)
			{
				_currentBanka.Validate();
			}
			//_Banka.Validate();
			OnCurrentEntityChanged();
		}

		//void uxBankaBindingSource_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
		//{
			//throw new Exception("The method or operation is not implemented.");
		//}		
		
		#endregion
		
		/// <summary>
		/// Gets the currently selected <c cref="Entities.Banka"/> instance.
		/// </summary>
		public Entities.Banka SelectedBanka
		{
			get {return this._currentBanka;}
		}
		
		#region other properties
		
		/// <summary>
		/// Gets or sets a value indicating whether you have provided your own data-management operations for the DataGridView control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool VirtualMode
		{
			get {return this.uxBankaDataGridView.VirtualMode;}
			set
			{
				this.uxBankaDataGridView.VirtualMode = value;
			}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the option to add rows is displayed to the user.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToAddRows
		{
			get {return this.uxBankaDataGridView.AllowUserToAddRows;}
			set {this.uxBankaDataGridView.AllowUserToAddRows = value;}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the user is allowed to delete rows from the DataGridView.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToDeleteRows
		{
			get {return this.uxBankaDataGridView.AllowUserToDeleteRows;}
			set {this.uxBankaDataGridView.AllowUserToDeleteRows = value;}
		}
		
		/// <summary>
		/// Gets the <c cref="DataGridView"/> instance.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public System.Windows.Forms.DataGridView DataGridView
		{
			get {return this.uxBankaDataGridView;}
		}
		
		/// <summary>
		/// Gets a collection that contains all the columns in the control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]		
		[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Visible)]
		//[System.ComponentModel.EditorAttribute("System.Windows.Forms.Design.DataGridViewColumnCollectionEditor, System.Design", typeof(System.Drawing.Design.UITypeEditor))] 
		public System.Windows.Forms.DataGridViewColumnCollection Columns
		{
			get { return this.uxBankaDataGridView.Columns; }
		}
		
		#endregion
		
		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;
	
		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}
	
		#region Constructor
	
		/// <summary>
		/// Initializes a new instance of the <see cref="BankaDataGridViewBase"/> class.
		/// </summary>
		public BankaDataGridViewBase()
		{			
			this.components = new System.ComponentModel.Container();			
			
			this.uxBankaDataGridView = new System.Windows.Forms.DataGridView();
			this.uxBankaBindingSource = new System.Windows.Forms.BindingSource(this.components);
			this.uxBankaErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
			this.uxIDDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxNazivDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxVodeciBrojDepozitneIstitucijeDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIDMjestoDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxMBDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxMinimalniIznosDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxMaksimalniIznosDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxMaksimalniBrojRataDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			//this.uxIDMjestoBindingSource = new MjestoBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDMjestoBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxBankaDataGridView)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxBankaBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxBankaErrorProvider)).BeginInit();
			this.SuspendLayout();
						
			// 
			// uxBankaErrorProvider
			// 
			this.uxBankaErrorProvider.ContainerControl = this;
			this.uxBankaErrorProvider.DataSource = this.uxBankaBindingSource;						
			// 
			// uxBankaDataGridView
			// 
			this.uxBankaDataGridView.AutoGenerateColumns = false;
			this.uxBankaDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
			this.uxBankaDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
		this.uxIDDataGridViewColumn,
		this.uxNazivDataGridViewColumn,
		this.uxVodeciBrojDepozitneIstitucijeDataGridViewColumn,
		this.uxIDMjestoDataGridViewColumn,
		this.uxMBDataGridViewColumn,
		this.uxMinimalniIznosDataGridViewColumn,
		this.uxMaksimalniIznosDataGridViewColumn,
		this.uxMaksimalniBrojRataDataGridViewColumn			});
			this.uxBankaDataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
			this.uxBankaDataGridView.Location = new System.Drawing.Point(0, 0);
			this.uxBankaDataGridView.Name = "uxBankaDataGridView";
			this.uxBankaDataGridView.Size = new System.Drawing.Size(470, 300);
			this.uxBankaDataGridView.TabIndex = 0;	
			this.uxBankaDataGridView.BackgroundColor = System.Drawing.Color.WhiteSmoke;
			this.uxBankaDataGridView.EnableHeadersVisualStyles = false;
			this.uxBankaDataGridView.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.OnBankaDataGridViewDataError);
			this.uxBankaDataGridView.CellValueNeeded += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnBankaDataGridViewCellValueNeeded);
			this.uxBankaDataGridView.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnBankaDataGridViewCellValuePushed);
			
			//
			// uxIDDataGridViewColumn
			//
			this.uxIDDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDDataGridViewColumn.DataPropertyName = "ID";
			this.uxIDDataGridViewColumn.HeaderText = "ID";
			this.uxIDDataGridViewColumn.Name = "uxIDDataGridViewColumn";
			this.uxIDDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDDataGridViewColumn.ReadOnly = true;		
			//
			// uxNazivDataGridViewColumn
			//
			this.uxNazivDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxNazivDataGridViewColumn.DataPropertyName = "Naziv";
			this.uxNazivDataGridViewColumn.HeaderText = "Naziv";
			this.uxNazivDataGridViewColumn.Name = "uxNazivDataGridViewColumn";
			this.uxNazivDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxNazivDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxNazivDataGridViewColumn.ReadOnly = false;		
			//
			// uxVodeciBrojDepozitneIstitucijeDataGridViewColumn
			//
			this.uxVodeciBrojDepozitneIstitucijeDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxVodeciBrojDepozitneIstitucijeDataGridViewColumn.DataPropertyName = "VodeciBrojDepozitneIstitucije";
			this.uxVodeciBrojDepozitneIstitucijeDataGridViewColumn.HeaderText = "VodeciBrojDepozitneIstitucije";
			this.uxVodeciBrojDepozitneIstitucijeDataGridViewColumn.Name = "uxVodeciBrojDepozitneIstitucijeDataGridViewColumn";
			this.uxVodeciBrojDepozitneIstitucijeDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxVodeciBrojDepozitneIstitucijeDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxVodeciBrojDepozitneIstitucijeDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDMjestoDataGridViewColumn
			//
			this.uxIDMjestoDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDMjestoDataGridViewColumn.DataPropertyName = "IDMjesto";
			this.uxIDMjestoDataGridViewColumn.HeaderText = "IDMjesto";
			this.uxIDMjestoDataGridViewColumn.Name = "uxIDMjestoDataGridViewColumn";
			this.uxIDMjestoDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDMjestoDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDMjestoDataGridViewColumn.ReadOnly = false;		
			//
			// uxMBDataGridViewColumn
			//
			this.uxMBDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxMBDataGridViewColumn.DataPropertyName = "MB";
			this.uxMBDataGridViewColumn.HeaderText = "MB";
			this.uxMBDataGridViewColumn.Name = "uxMBDataGridViewColumn";
			this.uxMBDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxMBDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxMBDataGridViewColumn.ReadOnly = false;		
			//
			// uxMinimalniIznosDataGridViewColumn
			//
			this.uxMinimalniIznosDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxMinimalniIznosDataGridViewColumn.DataPropertyName = "MinimalniIznos";
			this.uxMinimalniIznosDataGridViewColumn.HeaderText = "MinimalniIznos";
			this.uxMinimalniIznosDataGridViewColumn.Name = "uxMinimalniIznosDataGridViewColumn";
			this.uxMinimalniIznosDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxMinimalniIznosDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxMinimalniIznosDataGridViewColumn.ReadOnly = false;		
			//
			// uxMaksimalniIznosDataGridViewColumn
			//
			this.uxMaksimalniIznosDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxMaksimalniIznosDataGridViewColumn.DataPropertyName = "MaksimalniIznos";
			this.uxMaksimalniIznosDataGridViewColumn.HeaderText = "MaksimalniIznos";
			this.uxMaksimalniIznosDataGridViewColumn.Name = "uxMaksimalniIznosDataGridViewColumn";
			this.uxMaksimalniIznosDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxMaksimalniIznosDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxMaksimalniIznosDataGridViewColumn.ReadOnly = false;		
			//
			// uxMaksimalniBrojRataDataGridViewColumn
			//
			this.uxMaksimalniBrojRataDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxMaksimalniBrojRataDataGridViewColumn.DataPropertyName = "MaksimalniBrojRata";
			this.uxMaksimalniBrojRataDataGridViewColumn.HeaderText = "MaksimalniBrojRata";
			this.uxMaksimalniBrojRataDataGridViewColumn.Name = "uxMaksimalniBrojRataDataGridViewColumn";
			this.uxMaksimalniBrojRataDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxMaksimalniBrojRataDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxMaksimalniBrojRataDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDMjestoDataGridViewColumn
			//				
			this.uxIDMjestoDataGridViewColumn.DisplayMember = "Naziv";	
			this.uxIDMjestoDataGridViewColumn.ValueMember = "ID";	
			this.uxIDMjestoDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDMjestoDataGridViewColumn.DataSource = uxIDMjestoBindingSource;				
				
			
			// this
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.Controls.Add(this.uxBankaDataGridView);
			this.Name = "BankaDataGridView";
			this.Size = new System.Drawing.Size(470, 300);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDMjestoBindingSource)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxBankaErrorProvider)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxBankaDataGridView)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxBankaBindingSource)).EndInit();
			this.ResumeLayout(false);
		}
		#endregion
				
		#region events
		
		/// <summary>
		/// Raised the CurrentEntityChanged event.
		/// </summary>
		protected void OnCurrentEntityChanged()
		{
			if (CurrentEntityChanged != null)
			{
				BankaDataGridViewEventArgs args = new BankaDataGridViewEventArgs();
				args.Banka = _currentBanka;
				CurrentEntityChanged(this, args); 
			}
		}
		
		#endregion
		
		/// <summary>
		/// Strongly typed event 
		/// </summary>
		public class BankaDataGridViewEventArgs : System.EventArgs
		{
			private Entities.Banka	_Banka;
	
			/// <summary>
			/// the  Entities.Banka instance.
			/// </summary>
			public Entities.Banka Banka
			{
				get { return _Banka; }
				set { _Banka = value; }
			}	
		}
		
		/// <summary>
		/// Handles the DataError event of the uxBankaDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewDataErrorEventArgs"/> instance containing the event data.</param>
		protected void OnBankaDataGridViewDataError(object sender, System.Windows.Forms.DataGridViewDataErrorEventArgs e)
		{
			System.Diagnostics.Debug.WriteLine(string.Format( "{0}, {1}", e.ColumnIndex, e.RowIndex));
		}
		
		/// <summary>
		/// Handles the CellValueNeeded event of the uxBankaDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnBankaDataGridViewCellValueNeeded(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxBankaDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDDataGridViewColumn":
						e.Value = BankaList[e.RowIndex].ID;
						break;
					case "uxNazivDataGridViewColumn":
						e.Value = BankaList[e.RowIndex].Naziv;
						break;
					case "uxVodeciBrojDepozitneIstitucijeDataGridViewColumn":
						e.Value = BankaList[e.RowIndex].VodeciBrojDepozitneIstitucije;
						break;
					case "uxIDMjestoDataGridViewColumn":
						e.Value = BankaList[e.RowIndex].IDMjesto;
						break;
					case "uxMBDataGridViewColumn":
						e.Value = BankaList[e.RowIndex].MB;
						break;
					case "uxMinimalniIznosDataGridViewColumn":
						e.Value = BankaList[e.RowIndex].MinimalniIznos;
						break;
					case "uxMaksimalniIznosDataGridViewColumn":
						e.Value = BankaList[e.RowIndex].MaksimalniIznos;
						break;
					case "uxMaksimalniBrojRataDataGridViewColumn":
						e.Value = BankaList[e.RowIndex].MaksimalniBrojRata;
						break;
				default:
				break;
			}
		}
		
		/// <summary>
		/// Handles the CellValuePushed event of the uxBankaDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnBankaDataGridViewCellValuePushed(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxBankaDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDDataGridViewColumn":
						BankaList[e.RowIndex].ID = (System.Int32)e.Value;
						break;
					case "uxNazivDataGridViewColumn":
						BankaList[e.RowIndex].Naziv = (System.String)e.Value;
						break;
					case "uxVodeciBrojDepozitneIstitucijeDataGridViewColumn":
						BankaList[e.RowIndex].VodeciBrojDepozitneIstitucije = (System.Int32)e.Value;
						break;
					case "uxIDMjestoDataGridViewColumn":
						BankaList[e.RowIndex].IDMjesto = (System.Int32)e.Value;
						break;
					case "uxMBDataGridViewColumn":
						BankaList[e.RowIndex].MB = (System.String)e.Value;
						break;
					case "uxMinimalniIznosDataGridViewColumn":
						BankaList[e.RowIndex].MinimalniIznos = (System.Decimal?)e.Value;
						break;
					case "uxMaksimalniIznosDataGridViewColumn":
						BankaList[e.RowIndex].MaksimalniIznos = (System.Decimal?)e.Value;
						break;
					case "uxMaksimalniBrojRataDataGridViewColumn":
						BankaList[e.RowIndex].MaksimalniBrojRata = (System.Int32?)e.Value;
						break;
				default:
				break;
			}
		}
	}
}
